#ifndef __ENCODER_H__
#define __ENCODER_H__

#include "bsp_system.h"
#include "PID.h"
#include "tim.h"
#include "stdio.h"
#include "motor.h"

typedef struct
{
    int32_t encoder_l;
    int32_t encoder_r;
    float speed_l;
    float speed_r;
}encoder_struct;
extern encoder_struct encoder;
void encoder_init(encoder_struct * encoder_struct);
void encoder_proc(encoder_struct * encoder_struct , uint16_t time);
void Speed_PID_Init();
void encoder_task();
#endif /* __ENCODER_H */